package com.cf.r964;

import java.io.*;

public class d {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        int T = Integer.parseInt(br.readLine());
        while (T-- > 0) {
            String s = br.readLine();
            String t = br.readLine();
            String ans = dfs(s, t, 0, 0, s);
            out.println(ans);
        }
        out.flush();
        out.close();
        br.close();
    }

    public static String dfs(String s, String t, int sstart, int tstart, String ans) {
        if (sstart > s.length() || tstart > t.length()) {
            return ans;
        }
        if (sstart == s.length()) {

        }
        return "";
    }
}
